import request from '@/utils/request';

export async function getInspectPlanByPage(params: any) {
  return request('/api/device/getInspectPlanByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addInspectPlan(params: any) {
  return request('/api/device/addInspectPlan', {
    method: 'POST',
    data: params,
  });
}

export async function updateInspectPlan(params: any) {
  return request('/api/device/updateInspectPlan', {
    method: 'POST',
    data: params,
  });
}

export async function delInspectPlan(params: any) {
  return request('/api/device/delInspectPlan', {
    method: 'POST',
    data: params,
  });
}

export async function exportInspectPlan(params: any) {
  return request('/api/device/exportInspectPlan', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export async function getInspectID(params: any) {
  return request('/api/device/getInspectID', {
    method: 'POST',
    data: params,
  });
}
export async function getInspectBy(params: any) {
  return request('/api/device/getInspectBy', {
    method: 'POST',
    data: params,
  });
}
export async function receiveInspectSubItem(params: any) {
  return request('/api/device/receiveInspectSubItem', {
    method: 'POST',
    data: params,
  });
}
export async function generateInspectTask(params: any) {
  return request('/api/device/generateInspectTask', {
    method: 'POST',
    data: params,
  });
}
export default {
  getInspectPlanByPage,
  addInspectPlan,
  updateInspectPlan,
  delInspectPlan,
  exportInspectPlan,
  getInspectID,
  getInspectBy,
  receiveInspectSubItem,
  generateInspectTask,
};
